//导入vue-router
import VueRouter from 'vue-router';
import HomeContioner from './components/HomeContioner.vue';
import ShopCartContioner from './components/ShopCartContioner.vue';
import SearchContioner from './components/SearchContioner.vue';
import MembersContioner from './components/MembersContioner.vue';
import NewsList from './components/news/NewsList.vue';
import NewDetail from './components/news/NewDetail.vue';
import PhotoList from './components/photo/PhotoList.vue';
import PhotoDetail from './components/photo/PhotoDetail.vue';
import GoodsList from './components/goods/GoodsList.vue';
import GoodInfo from './components/goods/GoodInfo.vue';
import GoodComment from './components/goods/GoodComment.vue';
//创建路由对象
var router = new VueRouter({
	routes:[
		{'path':'/',redirect:"/home"},
		{'path':'/home',component:HomeContioner},
		{'path':'/members',component:MembersContioner},
		{'path':'/shopcart',component:ShopCartContioner},
		{'path':'/search',component:SearchContioner},
		{'path':'/home/newslist',component:NewsList},
		{'path':'/home/newslist/newdetail/:id',component:NewDetail},
		{'path':'/home/photolist',component:PhotoList},
		{'path':'/home/photolist/detail/:id',component:PhotoDetail},
		{'path':'/home/goodslist',component:GoodsList},
		{'path':'/home/goodinfo/:id',component:GoodInfo,name:'goodinfo'},
		{'path':'/home/goodcomment/:id',component:GoodComment,name:'goodcomment'}
	],
	linkActiveClass:'mui-active' //覆盖默认的路由高亮的类，默认的类叫做 router-link-active
});
//导出路由
export default router;